/**
 SiversPositivity.h

 \file
 Declaration of class SiversPositivity.

 \author Thomas Burton 
 \date 3/12/12
 \copyright 2012 BNL. All rights reserved.
*/

#ifndef _SiversPositivity_H_
#define _SiversPositivity_H_

#include <string>

#ifndef __CINT__
#include <boost/shared_ptr.hpp>
#endif

#include "tppmc/PartonContent.h"
#include "tppmc/PartonDistribution.h"

namespace tppmc {

   class Parton;

   namespace sivers {

      /**
       kT-independent positivity bound for the Sivers distribution.
       
       The bound is based on an input unpolarised distribution such that
          |sivers(x, Q2)| <= unpolarised(x, Q2)
       The Sivers distribution is defined to be positive for up quarks and
       negative for down quarks.
       kT dependence is not included as we assume a Gaussian kT dependence of
       the Sivers function that factorises from the x dependence, and is the
       same as the (unknown) kT dependence of the unpolarised distribution.
       As both the unpolarised and Sivers PDFs are only used in computing the
       Sivers event weight (the ratio of Sivers to unpolarised) this kT
       dependence cancels in their ratio.
       
       The actual kT distribution of partons comes from the PYTHIA event
       generation.
       \todo Make (non)zero sea distribution selectable.
       \todo Move headers for code in sivers namespace to a tppmc/sivers
       subdirectory, rename files to remove "Sivers..." from name.
      */
      class Positivity : public PartonDistribution {
      public:

         Positivity();
#ifndef __CINT__
         Positivity(boost::shared_ptr<PartonDistribution>);
#endif
         virtual ~Positivity();

         virtual void Evaluate(const Parton&, double, PartonContent&) const;

         virtual bool Supports(const Parton&) const;

         virtual std::string Name() const;

         virtual Int_t Write(const char* = 0, Int_t = 0, Int_t = 0);
         virtual Int_t Write(const char* = 0, Int_t = 0, Int_t = 0) const;

      protected:
#ifndef __CINT__
         boost::shared_ptr<PartonDistribution> mUnpolarised;
#endif
         ClassDef(tppmc::sivers::Positivity, 1)
      };

   } // namespace sivers
} // namespace tppmc

#endif
